package chapter3.No3_3_类ThreadLocal的使用.demo2;

/**
 * *：
 *    验证ThreadLocal的线程间隔离性
 * Created by Administrator on 2016/11/20.
 */
public class Main {
    public static void main(String[] args) {
        ThreadA a = new ThreadA();
        ThreadB b = new ThreadB();
        a.start();
        for(int i = 0; i < 10; i++) {
            Tools.tLocal.set("value"+(i+1));
            System.out.println("线程main 取值："+Tools.tLocal.get());
        }
        b.start();

    }
}
